package org.shareworth.online_life.util.listener;
 

import javax.servlet.ServletContextEvent;   
import javax.servlet.ServletContextListener;   
import javax.servlet.http.HttpSessionAttributeListener;   
import javax.servlet.http.HttpSessionBindingEvent;   
import javax.servlet.http.HttpSessionEvent;   
import javax.servlet.http.HttpSessionListener;   
   
import ognl.OgnlRuntime;   
   
/**  
 * 为了让Struts2能在AppEngine上运行，因此要在web.xml中添加这个监听 **  
 */   
public class InitListener implements ServletContextListener,   
        HttpSessionListener, HttpSessionAttributeListener {   
   
    public InitListener() {   
    }   
   
    public void contextInitialized(ServletContextEvent sce) {   
        OgnlRuntime.setSecurityManager(null);   
    }   
   
    public void contextDestroyed(ServletContextEvent arg0) {   
        // TODO Auto-generated method stub   
    }   
   
    public void sessionCreated(HttpSessionEvent arg0) {   
        // TODO Auto-generated method stub   
    }   
   
    public void sessionDestroyed(HttpSessionEvent arg0) {   
        // TODO Auto-generated method stub   
    }   
   
    public void attributeAdded(HttpSessionBindingEvent arg0) {   
        // TODO Auto-generated method stub   
    }   
   
    public void attributeRemoved(HttpSessionBindingEvent arg0) {   
        // TODO Auto-generated method stub   
    }   
   
    public void attributeReplaced(HttpSessionBindingEvent arg0) {   
        // TODO Auto-generated method stub   
    }   
   
}  
